package com.sky.controller.admin;

import com.sky.entity.Category;
import com.sky.entity.Category1;
import com.sky.result.Result;
import com.sky.service.CategoryService;
import com.sky.service.CategoryService1;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@Api(tags = "分类相关接口1")
@RequestMapping("/admin/category1")
public class CategoryController1 {
    @Autowired
    private CategoryService1 categoryService1;



    /**
     * @Author zxw
     * @Description //查询分类
     * @Datetime 16:26 2024/5/23
     **/
    @ApiOperation("查询分类1")
    @RequestMapping("/list1")
    public Result list(Integer type) {
        List<Category1> list = categoryService1.list(type);
        return Result.success(list);
    }



}
